﻿// -----------------------------------------------------------------------
// <copyright file="TaskReadMemoryString.cs" company="DarkBone">
// DarkBone
// </copyright>
// -----------------------------------------------------------------------

namespace DarkBone.Engine.Tasks
{
   using System;

   /// <summary>
   /// Task to Read Memory
   /// </summary>
   [Serializable]
   public class TaskReadMemoryString : Task
   {
      /// <summary>
      /// Address to read
      /// </summary>
      private IntPtr addressToRead;

      /// <summary>
      /// string read
      /// </summary>
      private string value;

      /// <summary>
      /// Initializes a new instance of the <see cref="TaskReadMemoryString"/> class. 
      /// </summary>
      /// <param name="addressToRead">
      /// Address to read
      /// </param>
      public TaskReadMemoryString(IntPtr addressToRead)
      {
         this.Id = ID.ReadMemoryString;
         this.addressToRead = addressToRead;
         this.value = string.Empty;
      }

      /// <summary>
      /// Gets or sets bytes
      /// </summary>
      public IntPtr AddressToRead
      {
         get
         {
            return this.addressToRead;
         }

         set
         {
            this.addressToRead = value;
         }
      }      

      /// <summary>
      /// Gets or sets value
      /// </summary>
      public string Value
      {
         get
         {
            return this.value;
         }

         set
         {
            this.value = value;
         }
      }      
   }
}
